package ro.tm.uvt.lp.raccoon.catchGame.entities.agents.actions;

import com.badlogic.gdx.math.Rectangle;

import ro.tm.uvt.lp.raccoon.catchGame.entities.agents.Dog;
import ro.tm.uvt.lp.raccoon.catchGame.entities.perceptions.CookieOdor;
import ro.tm.uvt.lp.raccoon.catchGame.entities.perceptions.DogOdor;
import ro.tm.uvt.lp.raccoon.catchGame.entities.physicalObjects.Food;
import ro.tm.uvt.lp.raccoon.catchGame.environment.Environment;

/**
 * Created by I309540 on 19.01.2015.
 */
public class RaccoonSniffCookieRight implements Sniff {
    @Override
    public boolean sniff(float x, float y){
        for(Food food: Environment.INSTANCE.getFoods())
        {
            if(food.getOdor().get(4).getBoundingRectangle().overlaps(new Rectangle(x+30,y,40,40))
                    || food.getOdor().get(0).getBoundingRectangle().overlaps(new Rectangle(x+30,y,40,40)))
                return true;

        }

        return false;
    }
}
